#ifndef GenericRepository_h
#define GenericRepository_h

#include "LinkedList.h"
#include <fstream>
#include <string>

using namespace std;

template<class TEntity>
class GenericRepository
{
      private : 
              LinkedList<TEntity> *entities;
              string fileName;
              fstream stream; 
              void saveChanges();
              void loadData();
      
      public :
             GenericRepository(string fileName);
             LinkedList<TEntity>* get();
             void add(TEntity *entity);
             void edit(TEntity *entity, int index);
             void remove(int index);        
};
#endif
